Skip to content

[Automated] Update grype CLI Options#2465

Merged
thomhurst merged 1 commit intomainfrom
automated/update-cli-options-grype
Apr 12, 2026
Merged

[Automated] Update grype CLI Options#2465
thomhurst merged 1 commit intomainfrom
automated/update-cli-options-grype

Conversation

@thomhurst
Copy link
Copy Markdown
Owner

Summary

This PR contains automatically generated updates to grype CLI options classes.

The generator scraped the latest CLI help output from the installed tool.

Changes

  • Updated options classes to reflect latest CLI documentation
  • Added new commands if any were detected
  • Updated option types and descriptions

Verification

  • Solution builds successfully

🤖 Generated with ModularPipelines.OptionsGenerator

@thomhurst thomhurst added automated dependencies Pull requests that update a dependency file labels Apr 5, 2026
@thomhurst thomhurst enabled auto-merge (squash) April 5, 2026 03:23
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: Automated grype CLI Options Update

This is a fully automated PR generated by ModularPipelines.OptionsGenerator. The sole change is a timestamp bump in AssemblyInfo.Generated.cs:

-[assembly: AssemblyMetadata("ModularPipelines.OptionsGenerator.GeneratedAt", "2026-03-29T03:15:57.4390081Z")]
+[assembly: AssemblyMetadata("ModularPipelines.OptionsGenerator.GeneratedAt", "2026-04-05T03:22:51.2019582Z")]

No options classes, command definitions, enums, or service interfaces were modified — the generator ran against the latest installed grype CLI and found the tool's API to be unchanged since the last run (2026-03-29).

Assessment

The change is correct and intentional. The generator is doing exactly what it should: periodically re-scraping the CLI help output and recording a new GeneratedAt timestamp to reflect the check, even when the underlying tool definition hasn't changed.

One Observation Worth Noting

Because this PR contains no substantive diff beyond the timestamp, it adds noise to the PR history without delivering any value. Consider whether the generator workflow should suppress PRs (or skip the commit entirely) when the only diff is a timestamp change. For example:

// Before committing/opening a PR, check whether anything other than
// the AssemblyMetadata timestamp changed. If the only change is the
// GeneratedAt attribute, skip creating the PR.
if (diff.OnlyTimestampChanged())
    return; // nothing to do

This would reduce automation fatigue and keep the PR log meaningful. The current behaviour is harmless, but over time a stream of timestamp-only PRs can desensitise reviewers to automated changes, which is a mild security/quality risk (easy to auto-approve something that actually changed).

Summary

  • The change itself is correct and safe to merge.
  • No functional impact on generated options or runtime behaviour.
  • Optional improvement: suppress PRs when only the GeneratedAt timestamp differs from the previous run.

@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Apr 5, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0 (≤ 20 complexity)

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@thomhurst thomhurst force-pushed the automated/update-cli-options-grype branch from 2fae002 to 23692f7 Compare April 12, 2026 03:34
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: [Automated] Update grype CLI Options

Previous review addressed: The prior review (2026-04-05) flagged that this PR contained only a timestamp change. The current iteration now includes substantive new functionality — the grype db diff command — so that concern no longer applies.


What Changed

File Change
AssemblyInfo.Generated.cs Timestamp updated to 2026-04-12
Options/GrypeDbDiffOptions.Generated.cs New options class for grype db diff
Services/GrypeDb.Generated.cs New Diff() method wired up to the options class

Assessment

The generated code is well-structured and consistent with the existing options classes (e.g. GrypeDbListOptions, GrypeDbCheckOptions). Specific things that check out:

  • [CliSubCommand("db", "diff")] correctly mirrors the two-level subcommand hierarchy.
  • Verbose as int? with CliOption + EqualsSeparated matches the identical pattern used in every other GrypeDb*Options class — consistent, not a regression.
  • Config and Profile with AllowMultiple = true are correct: both flags accept multiple values.
  • [ExcludeFromCodeCoverage] and [GeneratedCode] markers are present as expected.
  • The Diff method in GrypeDb.Generated.cs mirrors the existing Check/Delete/Import methods exactly.

One Architectural Observation (Generator-Level, Not This PR)

The grype db diff command takes positional arguments: grype db diff [flags] <base_db> [target_db]. The generated GrypeDbDiffOptions class has no properties for these positional database paths — so callers currently have no strongly-typed way to specify which databases to diff.

This is likely a general limitation of the options generator (it appears to scrape flags only, not positional args) and not something introduced here. But it means the Diff method is not fully usable without a workaround (e.g., passing raw args). Worth filing a generator issue to track positional-argument support if it isn't already being tracked.


Summary

The changes are correct, safe to merge, and follow the project's established auto-generation conventions. The only note above is a pre-existing generator limitation, not a defect in this PR.

@thomhurst thomhurst merged commit 5bd56a0 into main Apr 12, 2026
11 of 12 checks passed
@thomhurst thomhurst deleted the automated/update-cli-options-grype branch April 12, 2026 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant